﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frm_SaleBillList.aspx.cs"
    Inherits="SaleSystem.Business.frm_SaleBillList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>进货管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:PageManager runat="server" ID="PageManager1" />
        <ext:Toolbar runat="server" ID="toolbar1">
            <Items>
                <ext:Button runat="server" ID="bnSearch" Text="查询" Icon="Reload" Type="Submit" OnClick="bnSearch_Click">
                </ext:Button>
                <ext:Button runat="server" ID="bnNew" Text="新增" Icon="Add">
                </ext:Button>
            </Items>
        </ext:Toolbar>
        <ext:Form runat="server" ID="Form2" EnableBackgroundColor="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px" ShowBorder="false">
            <Rows>
                <ext:FormRow>
                    <Items>
                        <ext:TextBox runat="server" ID="tb_SBill_Code" Label="销售单号" Width="200px" TabIndex="1">
                        </ext:TextBox>
                        <ext:TextBox runat="server" ID="tb_SBill_Code2" Label="出库单号" Width="200px" TabIndex="2">
                        </ext:TextBox>
                    </Items>
                </ext:FormRow>
                <ext:FormRow>
                    <Items>
                        <ext:DropDownList runat="server" ID="ddl_SBill_Type" Label="销售单类型" Width="200px" DataValueField="BData_Id" TabIndex="3"
                            DataTextField="BData_Name">
                        </ext:DropDownList> 
                        <ext:TwinTriggerBox Width="200px"  runat="server" ID="tb_SBill_Cust_Id"   Label="客户名称"   ShowTrigger1="true" ShowTrigger2="true" Trigger1Icon="Clear" Trigger2Icon="Search" OnTrigger1Click="OnTrigger1Click" EnableEdit="false"  TabIndex="4"></ext:TwinTriggerBox>
                    </Items>
                </ext:FormRow>
                <ext:FormRow>
                    <Items>
                        <ext:DropDownList runat="server" ID="ddl_SBill_PayType" Label="结算方式" Width="200px"    DataValueField="Id" DataTextField="Name" TabIndex="5"></ext:DropDownList>
                        <ext:DropDownList runat="server" ID="ddl_SBill_State" Label="结算状态" Width="200px"    DataValueField="Id" DataTextField="Name" TabIndex="6"></ext:DropDownList>
                    </Items>
                </ext:FormRow>
                <ext:FormRow>
                    <Items>
                        <ext:NumberBox runat="server" ID="nb_SBill_RealMoney1" Label="实收金额>=" Width="200px" TabIndex="7" ></ext:NumberBox>
                        <ext:NumberBox runat="server" ID="nb_SBill_RealMoney2" Label="实收金额<=" Width="200px" TabIndex="8">
                        </ext:NumberBox>
                    </Items>
                </ext:FormRow>
                <ext:FormRow>
                    <Items>
                        <ext:DatePicker runat="server" ID="dp_SBill_Date1" Label="销售日期>=" Width="200px" TabIndex="9" ></ext:DatePicker>
                        <ext:DatePicker runat="server" ID="dp_SBill_Date2" Label="销售日期<=" Width="200px" TabIndex="10">
                        </ext:DatePicker>
                    </Items>
                </ext:FormRow>
                <ext:FormRow>
                    <Items>
                        <ext:DropDownList runat="server" ID="ddl_SBill_User" Label="经办人" Width="200px" DataValueField="SUser_Id" TabIndex="11"
                            DataTextField="SUser_Name">
                        </ext:DropDownList>
                    </Items>
                </ext:FormRow>
            </Rows>
        </ext:Form>
        <ext:Grid runat="server" ID="gv_List" EnableBackgroundColor="true" Title="进货单列表" AutoScroll="true"
            IsDatabasePaging="true" DataKeyNames="SBill_Id,SBill_Code" EnableRowNumber="true" AutoWidth="true"
            OnRowCommand="gv_List_RowCommand" AllowPaging="true" OnPageIndexChange="gv_List_PageIndexChange"
            AutoHeight="true" OnPreRowDataBound="gv_List_PreRowDataBound">
            <Columns>
                <ext:BoundField ColumnID="SBill_Code" DataField="SBill_Code" DataTooltipField="SBill_Code"
                    HeaderText="销售单号" Width="100px" />
                <ext:BoundField ColumnID="SBill_Code2" DataField="SBill_Code2" DataTooltipField="SBill_Code2"
                    HeaderText="出库单号" Width="100px" />
                <ext:BoundField ColumnID="SBill_TypeName" DataField="SBill_TypeName" DataTooltipField="SBill_TypeName"
                    HeaderText="单据类型" Width="80px" />
                <ext:BoundField ColumnID="Cust_Name" DataField="Cust_Name" DataTooltipField="Cust_Name"
                    HeaderText="客户" Width="80px" />
                <ext:BoundField ColumnID="SBill_PayTypeName" DataField="SBill_PayTypeName" DataTooltipField="SBill_PayTypeName"
                    HeaderText="结算方式" Width="80px" />
                <ext:BoundField ColumnID="AList_Name" DataField="AList_Name" DataTooltipField="AList_Name"
                    HeaderText="结算帐户" Width="100px" /> 
                <ext:BoundField ColumnID="SBill_RealMoney" DataField="SBill_RealMoney" DataTooltipField="SBill_RealMoney"
                    HeaderText="实收金额" Width="80px" />
                <ext:BoundField ColumnID="SUser_Name" DataField="SUser_Name" DataTooltipField="SUser_Name"
                    HeaderText="经办人" Width="60px" />
                <ext:TemplateField HeaderText="销售日期" Width="80px">
                    <ItemTemplate>
                        <%# DateTime.Parse(DataBinder.Eval(Container.DataItem, "SBill_Date").ToString()).ToString("yyyy-MM-dd")%>
                    </ItemTemplate>
                </ext:TemplateField>
                <ext:CheckBoxField DataTooltipField="SBill_State" Width="60px" RenderAsStaticField="true"
                    DataField="SBill_State" HeaderText="是否结算" />
                <ext:LinkButtonField ColumnID="edit" CommandName="edit" Text="编辑" HeaderText="编辑"
                    Width="60px" />
                <ext:LinkButtonField ColumnID="delete" CommandName="Delete" ConfirmIcon="Question"
                    ConfirmText="确认删除此信息？" Text="删除" HeaderText="删除" Width="60px" />
            </Columns>
        </ext:Grid>
    </div>
    <ext:Window runat="server" ID="win_Content" Popup="false" EnableIFrame="true" EnableConfirmOnClose="true"
        Title="选择客户" IFrameUrl="about:blank" Target="Top" IsModal="true" Width="800px"
        Height="600px" EnableMaximize="true">
    </ext:Window>
      <ext:Window runat="server" ID="win_Content2" Popup="false" EnableIFrame="true" EnableConfirmOnClose="true"
        Title="新增销售单" IFrameUrl="about:blank" Target="Top" IsModal="true" Width="800px"
        Height="600px" EnableMaximize="true"></ext:Window>
      <ext:HiddenField ID="hf_SBill_Cust_Id" runat="server"></ext:HiddenField>
    </form>
</body>
</html>
